package com.juyu.miliao.api.dao.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Repository;

import com.juyu.miliao.api.util.RedisKeys;

@Repository
public class ShareRedisDao {
	@Autowired
	private StringRedisTemplate stringRedisTemplate;

	public void addShareUser(Integer userId) {
		stringRedisTemplate.opsForSet().add(RedisKeys.SET_SHAREUSERID.getValue(),userId+"");
	}
	public boolean isMember(Integer userId) {
		return stringRedisTemplate.opsForSet().isMember(RedisKeys.SET_SHAREUSERID.getValue(),userId+"");
	}
	
}